#ifndef SEARCH_H
#define SEARCH_H

#include <iostream>
#include <string>
#include <sstream>
#include <fstream>
#include "XpensItem.h"
#include "ItemSpec.h"
#include "PaymentItem.h"
#include <vector>

using namespace std;

class Search{
private:
	vector <streampos> ExpsearchList;
	vector <streampos> PaysearchList;
public:
	streampos internalSearch(Item&);
	double expenseSearchDate(string Date);
	double paymentSearchDate(string Date);
	void expenseSearchKeyword(string);
	void expenseSearchKeywork(string);
	double PaymentMonth(int,int);
	double ExpenseMonth(int,int);
	bool powerSearch();
	void expensePrint();
	void paymentPrint();
	streampos getExpAddress(int);
	streampos getPayAddress(int);
	//pre: input a postion needed
	//post: output the corresponding address of the required position in the list
	//pre: input a postion needed
	//post: output the XpensItem of the required position in the list
	XpensItem getExpItem(int);
	PaymentItem getPayItem(int);
};

#endif